Integrand size = 31, antiderivative size = 108 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {(A-2 B) \text {arctanh}(\sin (c+d x))}{a^2 d}-\frac {(A-4 B) \tan (c+d x)}{3 a^2 d}-\frac {(A-2 B) \tan (c+d x)}{a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \]
(A-2*B)*arctanh(sin(d*x+c))/a^2/d-1/3*(A-4*B)*tan(d*x+c)/a^2/d-(A-2*B)*tan (d*x+c)/a^2/d/(1+sec(d*x+c))+1/3*(A-B)*sec(d*x+c)^2*tan(d*x+c)/d/(a+a*sec( d*x+c))^2
Time = 0.90 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.10 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (6 (A-2 B) \text {arctanh}(\sin (c+d x)) \cos ^3\left (\frac {1}{2} (c+d x)\right )+(-2 A+8 B+(-5 A+14 B) \cos (c+d x)+(-2 A+5 B) \cos (2 (c+d x))) \sec (c+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d (1+\sec (c+d x))^2} \]
(2*Cos[(c + d*x)/2]*Sec[c + d*x]^2*(6*(A - 2*B)*ArcTanh[Sin[c + d*x]]*Cos[ (c + d*x)/2]^3 + (-2*A + 8*B + (-5*A + 14*B)*Cos[c + d*x] + (-2*A + 5*B)*C os[2*(c + d*x)])*Sec[c + d*x]*Sin[(c + d*x)/2]))/(3*a^2*d*(1 + Sec[c + d*x ])^2)
Time = 0.80 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.08, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {3042, 4507, 3042, 4496, 25, 3042, 4274, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a \sec (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4507 |
\(\displaystyle \frac {\int \frac {\sec ^2(c+d x) (2 a (A-B)-a (A-4 B) \sec (c+d x))}{\sec (c+d x) a+a}dx}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (2 a (A-B)-a (A-4 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4496 |
\(\displaystyle \frac {-\frac {\int -\sec (c+d x) \left (3 a^2 (A-2 B)-a^2 (A-4 B) \sec (c+d x)\right )dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \sec (c+d x) \left (3 a^2 (A-2 B)-a^2 (A-4 B) \sec (c+d x)\right )dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 a^2 (A-2 B)-a^2 (A-4 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {3 a^2 (A-2 B) \int \sec (c+d x)dx-a^2 (A-4 B) \int \sec ^2(c+d x)dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 a^2 (A-2 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-a^2 (A-4 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {a^2 (A-4 B) \int 1d(-\tan (c+d x))}{d}+3 a^2 (A-2 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {3 a^2 (A-2 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^2 (A-4 B) \tan (c+d x)}{d}}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {3 a^2 (A-2 B) \text {arctanh}(\sin (c+d x))}{d}-\frac {a^2 (A-4 B) \tan (c+d x)}{d}}{a^2}-\frac {3 (A-2 B) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
((A - B)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + ((-3* (A - 2*B)*Tan[c + d*x])/(d*(1 + Sec[c + d*x])) + ((3*a^2*(A - 2*B)*ArcTanh [Sin[c + d*x]])/d - (a^2*(A - 4*B)*Tan[c + d*x])/d)/a^2)/(3*a^2)
3.1.92.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot [e + f*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1))), x] + Simp[1/(b^2*(2*m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[A*b*m - a*B*m + b *B*(2*m + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && Ne Q[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(a*f*( 2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)* (d*Csc[e + f*x])^(n - 1)*Simp[A*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && G tQ[n, 0]
Time = 0.77 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.17
method | result | size |
parallelrisch | \(\frac {-6 \cos \left (d x +c \right ) \left (A -2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+6 \cos \left (d x +c \right ) \left (A -2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\left (\frac {2 A}{5}-B \right ) \cos \left (2 d x +2 c \right )+\left (A -\frac {14 B}{5}\right ) \cos \left (d x +c \right )+\frac {2 A}{5}-\frac {8 B}{5}\right )}{6 a^{2} d \cos \left (d x +c \right )}\) | \(126\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\left (-4 B +2 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (-2 A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}}{2 d \,a^{2}}\) | \(134\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\left (-4 B +2 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\left (-2 A +4 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 B}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}}{2 d \,a^{2}}\) | \(134\) |
norman | \(\frac {\frac {\left (4 A -9 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a d}+\frac {3 \left (A -3 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {\left (A -2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}-\frac {\left (13 A -34 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} a}+\frac {\left (A -2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}-\frac {\left (A -2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2} d}\) | \(192\) |
risch | \(-\frac {2 i \left (3 A \,{\mathrm e}^{4 i \left (d x +c \right )}-6 B \,{\mathrm e}^{4 i \left (d x +c \right )}+9 A \,{\mathrm e}^{3 i \left (d x +c \right )}-18 B \,{\mathrm e}^{3 i \left (d x +c \right )}+7 A \,{\mathrm e}^{2 i \left (d x +c \right )}-22 B \,{\mathrm e}^{2 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )} A -24 B \,{\mathrm e}^{i \left (d x +c \right )}+4 A -10 B \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a^{2} d}\) | \(227\) |
1/6*(-6*cos(d*x+c)*(A-2*B)*ln(tan(1/2*d*x+1/2*c)-1)+6*cos(d*x+c)*(A-2*B)*l n(tan(1/2*d*x+1/2*c)+1)-5*tan(1/2*d*x+1/2*c)*sec(1/2*d*x+1/2*c)^2*((2/5*A- B)*cos(2*d*x+2*c)+(A-14/5*B)*cos(d*x+c)+2/5*A-8/5*B))/a^2/d/cos(d*x+c)
Time = 0.29 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.81 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {3 \, {\left ({\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (A - 2 \, B\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (A - 2 \, B\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, {\left (2 \, A - 5 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (5 \, A - 14 \, B\right )} \cos \left (d x + c\right ) - 3 \, B\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}} \]
1/6*(3*((A - 2*B)*cos(d*x + c)^3 + 2*(A - 2*B)*cos(d*x + c)^2 + (A - 2*B)* cos(d*x + c))*log(sin(d*x + c) + 1) - 3*((A - 2*B)*cos(d*x + c)^3 + 2*(A - 2*B)*cos(d*x + c)^2 + (A - 2*B)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2* (2*(2*A - 5*B)*cos(d*x + c)^2 + (5*A - 14*B)*cos(d*x + c) - 3*B)*sin(d*x + c))/(a^2*d*cos(d*x + c)^3 + 2*a^2*d*cos(d*x + c)^2 + a^2*d*cos(d*x + c))
\[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {A \sec ^{3}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
(Integral(A*sec(c + d*x)**3/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x) + I ntegral(B*sec(c + d*x)**4/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x))/a**2
Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (104) = 208\).
Time = 0.25 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.26 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {B {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - A {\left (\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )}}{6 \, d} \]
1/6*(B*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(si n(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d *x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1))) - A*((9*sin(d*x + c)/ (cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 6*log(sin( d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 6*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2))/d
Time = 0.30 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.40 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\frac {6 \, {\left (A - 2 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {6 \, {\left (A - 2 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} - \frac {12 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{2}} - \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
1/6*(6*(A - 2*B)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 6*(A - 2*B)*log( abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 - 12*B*tan(1/2*d*x + 1/2*c)/((tan(1/2*d *x + 1/2*c)^2 - 1)*a^2) - (A*a^4*tan(1/2*d*x + 1/2*c)^3 - B*a^4*tan(1/2*d* x + 1/2*c)^3 + 9*A*a^4*tan(1/2*d*x + 1/2*c) - 15*B*a^4*tan(1/2*d*x + 1/2*c ))/a^6)/d
Time = 13.48 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.11 \[ \int \frac {\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (A-2\,B\right )}{a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A-B\right )}{6\,a^2\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {A-B}{a^2}+\frac {A-3\,B}{2\,a^2}\right )}{d}-\frac {2\,B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )} \]